package com.share.openfeign;

import com.share.pojo.domain.LoginVo;
import com.share.result.JSONResult;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class UaaOpenfeignFallbackFactory implements FallbackFactory<UaaOpenfeign> {
    @Override
    public UaaOpenfeign create(Throwable cause) {
        return new UaaOpenfeign() {
            @Override
            public JSONResult register(LoginVo loginVo) {
                return JSONResult.error("添加失败");
            }
        };
    }
}
